Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
Is `==` still called the "abstract equality operator"?

== used to be called the abstract equality operator, and its abstract equality comparison algorithm was defined in the ECMAScript specification.

This algorithm is now named IsLooselyEqual in the specification, and the term "abstract equality" is no longer used in the specification.

Has the operator been renamed?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You can call == the abstract equality operator because it checks according to the abstract equality comparison algorithm. So, this is a valid, if unofficial, name for it.

The more popular name for this is "loose equality". Also an unofficial name. It is opposed to "strict equality" with ===.


The operator is simply referred to "the equals operator" in ECMAScript 5.

In ECMAScript 6 the specification has an umbrella 12.10 Equality Operators section which groups together ==, !=, ===, and !==. However, parts of the specification do still mention "the equality operator" like 12.10.3 Runtime Semantics: Evaluation which reads the following at the end of the section:

NOTE 2 The equality operators maintain the following invariants:

  • A != B is equivalent to !(A == B).
  • A == B is equivalent to B == A, except in the order of evaluation of A and B.

NOTE 3 The equality operator is not always transitive. For example, there might be two distinct String objects, each representing the same String value; each String object would be considered equal to the String value by the == operator, but the two String objects would not be equal to each other. For example:

  • new String("a") == "a" and "a" == new String("a") are both true.
  • new String("a") == new String("a") is false.

This is still the case in the latest official ECMAScript 12 (2021) specification. The relevant section is 13.11 Equality Operators which still contains ==, !=, ===, and !==. The end of 13.11.1 Runtime Semantics: Evaluation still contains the same notes as ECMAScript 6 did.


Therefore the operator is "the equality operator*. The operation it performs is called the Abstract Equality Comparison in ECMAScript 12 (with an analogous "Strict Equality Comparison" for ===) and recently has been renamed to IsLooselyEqual (with an analogous "IsStrictlyEqual") in the latest (2022) draft.

about 4 years ago · Juan Pablo Isaza Report

0

In ECMAScript 5, the == operator was called the "equals operator", and === was called the "strict equals operator".

In ES2022, the term "equality operators" is used to encompass both (and the word-pairing "equals operator" does not occur).

The term "loose equality operator" does not appear in ES2022, although the algorithm used to define its behavior is called IsLooselyEqual.

The term "strict equality operator" does not appear in ES2022, although the algorithm used to define its behavior is called IsStrictlyEqual.

On this basis, I would say == was never* officially called the "abstract equality operator". It was the "equals operator". However, given that this term is no longer used in the specification, perhaps its name has changed to the "equality operator" or possibly the "loose equality operator" (with the converse being the "strict equality operator").

*need to check prior to ES5

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!